<div class="col-12">
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">{{.label}}</h3>
            <div class="card-tools">
                <div class="input-group input-group-sm" style="width: 250px;">
                    <a class="btn btn-success btn-sm" data-toggle="modal" data-target="#addModal">
                        <i class="fa fa-plus "></i>
                    </a>
                    <input id="search-key" type="text" name="table_search" class="form-control float-right"
                           placeholder="分支关键字" value="{{ .key }}">
                    <div class="input-group-append">
                        <a type="submit" class="btn btn-default" id="search-a">
                            <i class="fa fa-search" style="color: grey"></i>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.card-header -->
        <div class="card-body table-responsive p-0">
            <table class="table table-hover text-nowrap ">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>项目</th>
                    <th>平台</th>
                    <th>分支</th>
                    <th>备注</th>
                    <th>当前版本</th>
                    <th>发布时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {{ range  .data_list }}
                    <tr>
                        <td>{{ .ID }}</td>
                        <td>{{ .Platfm.Prj.PrjName }}</td>
                        <td>{{ .Platfm.PlatfmName }}</td>
                        <td>{{ .BranchName }}</td>
                        <td>{{ .BranchMsg }}</td>
                        <td name='vs'><a class="btn btn-xs btn-success" href="javascript:;">{{ .CurVersion }}</a>
                        </td>
                        <td>{{ .ReleaseTime }}</td>
                        <td>
                            <a class="btn btn-xs btn-success" href="javascript:;" name="update"
                               up_id="{{ .ID }}"
                               style="text-decoration:none;" title="内测服更新"><span class="fa fa-refresh"></span> </a>

                            <a class="btn btn-xs btn-info" href="javascript:;" name="edit"
                               edit_id="{{ .ID }}" style="text-decoration:none;" title="修改"><span
                                        class="fa fa-pencil"></span></a>
                            <a class="btn btn-xs btn-danger" href="javascript:;" name="del"
                               del_id="{{ .ID }}" style="text-decoration:none;" title="删除"><span
                                        class="fa fa-trash"></span></a>
                        </td>
                    </tr>

                {{end}}

                </tbody>
            </table>
        </div>
        <!-- /.card-body -->
        <div class="card-footer clearfix">
            <ul class="pagination pull-right" style="margin-right: 50px">
                {{if eq $.page.CurPage 1 }}
                    <li class="page-item disabled"><a class="page-link" href="/item/branch/1/">首页</a></li>
                    <li class="page-item disabled"><a class="page-link disabled" href="/item/branch/{{ Sub $.page.CurPage 1 }}/">上一页</a></li>
                {{ else }}
                    <li class="page-item"><a class="page-link" href="/item/branch/1/">首页</a></li>
                    <li class="page-item"><a class="page-link" href="/item/branch/{{ Sub $.page.CurPage 1 }}/">上一页</a></li>
                {{ end }}
                </li>

                {{range $k,$v:=.page.Nums}}
                    <li class="page-item"><a class="page-link {{if eq $v $.page.CurPage}}active{{end}}" href="/item/branch/{{$v}}/">{{ $v }}</a></li>
                    </li>
                {{end}}

                {{if eq $.page.CurPage .page.PageCount }}
                    <li class="page-item disabled"><a class="page-link" href="/item/branch/{{ Add $.page.CurPage 1 }}/">下一页</a></li>
                    <li class="page-item disabled"><a class="page-link" href="/item/branch/{{ .page.PageCount }}/">尾页</a></li>
                {{ else }}
                    <li class="page-item"><a class="page-link" href="/item/branch/{{ Add $.page.CurPage 1 }}/">下一页</a></li>
                    <li class="page-item"><a class="page-link" href="/item/branch/{{ .page.PageCount }}/">尾页</a></li>
                {{ end }}
            </ul>
        </div>

    </div>
    <!-- /.card -->
</div>

<!--模态框-->
<!--添加-->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="addModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="addModalLabel">添加</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                        style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">平台:</label>
                    <div class="col-sm-6">
                        <select name="" id="release-platfm" class="form-control">
                            {{ range .platfm_list }}
                                <option value="{{ .ID }}">{{ .Prj.PrjName }}-{{ .PlatfmName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>
                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">分支:</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="分支" id="branch-name">
                    </div>
                </div>

                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">备注:</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="备注" id="branch-msg">
                    </div>
                </div>

                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">测试地址:</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="URL" id="test-url">
                    </div>
                </div>
            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="add-sub">提交</button>
            </div>
        </div>
    </div>
</div>
<!--/添加-->


<!--修改-->
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="editModalLabel">修改</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                        style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label text-right">平台:</label>
                    <div class="col-sm-6">
                        <select name="" id="edit-release-platfm" class="form-control">
                            {{ range .platfm_list }}
                                <option value="{{ .ID }}">{{ .Prj.PrjName }}-{{ .PlatfmName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>
                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">分支:</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="分支" id="edit-branch-name">
                    </div>
                </div>

                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">备注:</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="备注" id="edit-branch-msg">
                    </div>
                </div>

                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">测试地址:</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="URL" id="edit-test-url">
                    </div>
                </div>
            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="edit-sub">提交</button>
            </div>
        </div>
    </div>
</div>
<!--/修改-->

<!--/模态框-->

